SET( LIB_NAME OpenIG-Plugin-SkyDome )
SET( TARGET_SRC_FILES IGPluginSkyDome.cpp )
SET( TARGET_OTHER_FILES DataFiles/libIgPlugin-SkyDome.so.xml
                        DataFiles/libIgPlugin-SkyDome.so.windows.xml )

ADD_LIBRARY( ${LIB_NAME} SHARED
             ${TARGET_SRC_FILES}
             ${TARGET_OTHER_FILES} )

TARGET_LINK_LIBRARIES( ${LIB_NAME}
    ${OSG_LIBRARIES}
    OpenIG-Engine
)

SET_TARGET_PROPERTIES( ${LIB_NAME} PROPERTIES VERSION ${OPENIG_VERSION} )
SET_TARGET_PROPERTIES( ${LIB_NAME} PROPERTIES SOVERSION ${OPENIG_VERSION} )
SET_TARGET_PROPERTIES( ${LIB_NAME} PROPERTIES PROJECT_LABEL "Plugin SkyDome" )

INCLUDE( PluginInstall REQUIRED )

IF (APPLE)
    INSTALL(FILES ${CMAKE_CURRENT_LIST_DIR}/DataFiles/libIgPlugin-SkyDome.so.xml DESTINATION ${INSTALL_LIBDIR} RENAME libOpenIG-Plugin-SkyDome.dylib.xml)
ELSEIF(WIN32)
    INSTALL(FILES ${CMAKE_CURRENT_LIST_DIR}/DataFiles/libIgPlugin-SkyDome.so.windows.xml DESTINATION ${INSTALL_BINDIR} RENAME OpenIG-Plugin-SkyDome.dll.xml)
ELSE()
    INSTALL(FILES ${CMAKE_CURRENT_LIST_DIR}/DataFiles/libIgPlugin-SkyDome.so.xml DESTINATION ${INSTALL_LIBDIR} RENAME libOpenIG-Plugin-SkyDome.so.xml)
ENDIF()
